<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>PGPLOT - allow subroutines in the PGPLOT graphics library to be called from Perl. - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of PGPLOT - MetaCPAN" href="https://metacpan.org/dist/PGPLOT/releases.rss" />
        <link rel="canonical" href="PGPLOT.html" />
        <meta name="description" content="allow subroutines in the PGPLOT graphics library to be called from Perl." />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/PGPLOT" />
<meta name="twitter:title"       content="PGPLOT" />
<meta name="twitter:description" content="allow subroutines in the PGPLOT graphics library to be called from Perl." />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="PGPLOT.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of PGPLOT was released.">
      <span class="relatize">24 Feb 2022 16:37:32 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/PGPLOT">PGPLOT</a>
  </li>
  <li>
    Module version: 2.28
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/PGPLOT/source/PGPLOT.pm">Source</a>
    (<a href="https://metacpan.org/dist/PGPLOT/source/PGPLOT.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/PGPLOT/source">Browse</a>
    (<a href="https://metacpan.org/dist/PGPLOT/source?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/PGPLOT/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/PGPLOT/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/PDLPorters/perl5-PGPLOT">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/PDLPorters/perl5-PGPLOT/issues">Issues</a>
      (3)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=PGPLOT+2.28" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/P/PGPLOT.html?oncpan=1&amp;distmat=1&amp;version=2.28&amp;grade=2" style="color: #090">29</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/P/PGPLOT.html?oncpan=1&amp;distmat=1&amp;version=2.28&amp;grade=3" style="color: #900">10</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/P/PGPLOT.html?oncpan=1&amp;distmat=1&amp;version=2.28&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/ETJ/PGPLOT-2.28">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on PGPLOT who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/PGPLOT-2.28/index.html">% Coverage </a>
    </li>
    <li>
      License: unknown
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/PGPLOT/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/E/ET/ETJ/PGPLOT-2.28.tar.gz">
      Download (<span itemprop="fileSize">54.78KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FETJ%2FPGPLOT-2.28%2FPGPLOT.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/PGPLOT/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/PGPLOT/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:PGPLOT">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="PGPLOT">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/PGPLOT.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="ETJ/PGPLOT-2.28"
>2.28
  (ETJ on 2022-02-24)</option>
<option
  
  value="KGB/PGPLOT-2.21"
>2.21
  (KGB on 2011-01-01)</option>
<optgroup label="BackPAN">'
<option
  
  value="ETJ/PGPLOT-2.27"
>2.27
  (ETJ on 2021-02-16)</option>
<option
  
  value="ETJ/PGPLOT-2.26"
>2.26
  (ETJ on 2021-02-15)</option>
<option
  
  value="ETJ/PGPLOT-2.25"
>2.25
  (ETJ on 2021-02-13)</option>
<option
  
  value="KGB/PGPLOT-2.22"
>2.22
  (KGB on 2021-01-11)</option>
<option
  
  value="ETJ/PGPLOT-2.24"
>2.24
  (ETJ on 2019-03-19)</option>
<option
  
  value="ETJ/PGPLOT-2.23"
>2.23
  (ETJ on 2019-03-17)</option>
<option
  
  value="ETJ/PGPLOT-2.22"
>2.22
  (ETJ on 2019-03-17)</option>
<option
  
  value="KGB/PGPLOT-2.20"
>2.20
  (KGB on 2007-05-16)</option>
<option
  
  value="KGB/PGPLOT-2.19"
>2.19
  (KGB on 2006-01-03)</option>
<option
  
  value="KGB/PGPLOT-2.18"
>2.18
  (KGB on 2000-12-28)</option>
<option
  
  value="KGB/PGPLOT-2.17"
>2.17
  (KGB on 2000-05-08)</option>
<option
  
  value="KGB/PGPLOT-2.16"
>2.16
  (KGB on 2000-03-10)</option>
<option
  
  value="KGB/PGPLOT-2.15"
>2.15
  (KGB on 1999-10-26)</option>
<option
  
  value="KGB/PGPLOT-2.14"
>2.14
  (KGB on 1999-10-15)</option>
<option
  
  value="KGB/PGPLOT-2.13"
>2.13
  (KGB on 1999-05-14)</option>
<option
  
  value="KGB/PGPLOT-2.12"
>2.12
  (KGB on 1999-05-10)</option>
<option
  
  value="KGB/PGPLOT-2.11"
>2.11
  (KGB on 1998-09-11)</option>
<option
  
  value="KGB/PGPLOT-2.10"
>2.10
  (KGB on 1998-05-21)</option>
<option
  
  value="KGB/PGPLOT-2.09"
>2.09
  (KGB on 1998-02-17)</option>
<option
  
  value="KGB/PGPLOT-2.08"
>2.08
  (KGB on 1998-01-07)</option>
<option
  
  value="KGB/PGPLOT-2.07"
>2.07
  (KGB on 1997-09-03)</option>
<option
  
  value="KGB/PGPLOT-2.06"
>2.06
  (KGB on 1997-06-09)</option>
<option
  
  value="KGB/PGPLOT-2.05"
>2.05
  (KGB on 1997-03-03)</option>
<option
  
  value="KGB/PGPLOT-2.04"
>2.04
  (KGB on 1997-02-24)</option>
<option
  
  value="KGB/PGPLOT-2.02"
>2.02
  (KGB on 1997-02-19)</option>
<option
  
  value="KGB/PGPLOT-2.01"
>2.01
  (KGB on 1997-01-03)</option>
<option
  
  value="KGB/PGPLOT-2.0"
>2.0
  (KGB on 1997-01-02)</option>
<option
  
  value="KGB/PGPLOT1.0b_src"
>1.0b_src
  (KGB on 1996-02-23)</option>
<option
  
  value="KGB/PGPLOT1.0a_src"
>1.0a_src
  (KGB on 1996-02-23)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/ETJ/PGPLOT-2.28/diff/' + encodeURIComponent(this.value) + '/PGPLOT.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="ETJ/PGPLOT-2.28"
>2.28
  (ETJ on 2022-02-24)</option>
<option
  
  value="KGB/PGPLOT-2.21"
>2.21
  (KGB on 2011-01-01)</option>
<optgroup label="BackPAN">'
<option
  
  value="ETJ/PGPLOT-2.27"
>2.27
  (ETJ on 2021-02-16)</option>
<option
  
  value="ETJ/PGPLOT-2.26"
>2.26
  (ETJ on 2021-02-15)</option>
<option
  
  value="ETJ/PGPLOT-2.25"
>2.25
  (ETJ on 2021-02-13)</option>
<option
  
  value="KGB/PGPLOT-2.22"
>2.22
  (KGB on 2021-01-11)</option>
<option
  
  value="ETJ/PGPLOT-2.24"
>2.24
  (ETJ on 2019-03-19)</option>
<option
  
  value="ETJ/PGPLOT-2.23"
>2.23
  (ETJ on 2019-03-17)</option>
<option
  
  value="ETJ/PGPLOT-2.22"
>2.22
  (ETJ on 2019-03-17)</option>
<option
  
  value="KGB/PGPLOT-2.20"
>2.20
  (KGB on 2007-05-16)</option>
<option
  
  value="KGB/PGPLOT-2.19"
>2.19
  (KGB on 2006-01-03)</option>
<option
  
  value="KGB/PGPLOT-2.18"
>2.18
  (KGB on 2000-12-28)</option>
<option
  
  value="KGB/PGPLOT-2.17"
>2.17
  (KGB on 2000-05-08)</option>
<option
  
  value="KGB/PGPLOT-2.16"
>2.16
  (KGB on 2000-03-10)</option>
<option
  
  value="KGB/PGPLOT-2.15"
>2.15
  (KGB on 1999-10-26)</option>
<option
  
  value="KGB/PGPLOT-2.14"
>2.14
  (KGB on 1999-10-15)</option>
<option
  
  value="KGB/PGPLOT-2.13"
>2.13
  (KGB on 1999-05-14)</option>
<option
  
  value="KGB/PGPLOT-2.12"
>2.12
  (KGB on 1999-05-10)</option>
<option
  
  value="KGB/PGPLOT-2.11"
>2.11
  (KGB on 1998-09-11)</option>
<option
  
  value="KGB/PGPLOT-2.10"
>2.10
  (KGB on 1998-05-21)</option>
<option
  
  value="KGB/PGPLOT-2.09"
>2.09
  (KGB on 1998-02-17)</option>
<option
  
  value="KGB/PGPLOT-2.08"
>2.08
  (KGB on 1998-01-07)</option>
<option
  
  value="KGB/PGPLOT-2.07"
>2.07
  (KGB on 1997-09-03)</option>
<option
  
  value="KGB/PGPLOT-2.06"
>2.06
  (KGB on 1997-06-09)</option>
<option
  
  value="KGB/PGPLOT-2.05"
>2.05
  (KGB on 1997-03-03)</option>
<option
  
  value="KGB/PGPLOT-2.04"
>2.04
  (KGB on 1997-02-24)</option>
<option
  
  value="KGB/PGPLOT-2.02"
>2.02
  (KGB on 1997-02-19)</option>
<option
  
  value="KGB/PGPLOT-2.01"
>2.01
  (KGB on 1997-01-03)</option>
<option
  
  value="KGB/PGPLOT-2.0"
>2.0
  (KGB on 1997-01-02)</option>
<option
  
  value="KGB/PGPLOT1.0b_src"
>1.0b_src
  (KGB on 1996-02-23)</option>
<option
  
  value="KGB/PGPLOT1.0a_src"
>1.0a_src
  (KGB on 1996-02-23)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><i class="ttip" title="dynamic_config enabled">unknown</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/PGPLOT/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=PGPLOT">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=PGPLOT">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/ETJ/PGPLOT-2.28/view/PGPLOT.pm">This version</a>
    </li>
    <li>
      <a href="PGPLOT.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
    1 non-PAUSE user
</div>
</div>
    </li>
    <li>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/ETJ" class="author-name">Ed J</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/PGPLOT.pm&#39;" class="">
<option
  selected
  value="ETJ/PGPLOT-2.28"
>2.28
  (ETJ on 2022-02-24)</option>
<option
  
  value="KGB/PGPLOT-2.21"
>2.21
  (KGB on 2011-01-01)</option>
<optgroup label="BackPAN">'
<option
  
  value="ETJ/PGPLOT-2.27"
>2.27
  (ETJ on 2021-02-16)</option>
<option
  
  value="ETJ/PGPLOT-2.26"
>2.26
  (ETJ on 2021-02-15)</option>
<option
  
  value="ETJ/PGPLOT-2.25"
>2.25
  (ETJ on 2021-02-13)</option>
<option
  
  value="KGB/PGPLOT-2.22"
>2.22
  (KGB on 2021-01-11)</option>
<option
  
  value="ETJ/PGPLOT-2.24"
>2.24
  (ETJ on 2019-03-19)</option>
<option
  
  value="ETJ/PGPLOT-2.23"
>2.23
  (ETJ on 2019-03-17)</option>
<option
  
  value="ETJ/PGPLOT-2.22"
>2.22
  (ETJ on 2019-03-17)</option>
<option
  
  value="KGB/PGPLOT-2.20"
>2.20
  (KGB on 2007-05-16)</option>
<option
  
  value="KGB/PGPLOT-2.19"
>2.19
  (KGB on 2006-01-03)</option>
<option
  
  value="KGB/PGPLOT-2.18"
>2.18
  (KGB on 2000-12-28)</option>
<option
  
  value="KGB/PGPLOT-2.17"
>2.17
  (KGB on 2000-05-08)</option>
<option
  
  value="KGB/PGPLOT-2.16"
>2.16
  (KGB on 2000-03-10)</option>
<option
  
  value="KGB/PGPLOT-2.15"
>2.15
  (KGB on 1999-10-26)</option>
<option
  
  value="KGB/PGPLOT-2.14"
>2.14
  (KGB on 1999-10-15)</option>
<option
  
  value="KGB/PGPLOT-2.13"
>2.13
  (KGB on 1999-05-14)</option>
<option
  
  value="KGB/PGPLOT-2.12"
>2.12
  (KGB on 1999-05-10)</option>
<option
  
  value="KGB/PGPLOT-2.11"
>2.11
  (KGB on 1998-09-11)</option>
<option
  
  value="KGB/PGPLOT-2.10"
>2.10
  (KGB on 1998-05-21)</option>
<option
  
  value="KGB/PGPLOT-2.09"
>2.09
  (KGB on 1998-02-17)</option>
<option
  
  value="KGB/PGPLOT-2.08"
>2.08
  (KGB on 1998-01-07)</option>
<option
  
  value="KGB/PGPLOT-2.07"
>2.07
  (KGB on 1997-09-03)</option>
<option
  
  value="KGB/PGPLOT-2.06"
>2.06
  (KGB on 1997-06-09)</option>
<option
  
  value="KGB/PGPLOT-2.05"
>2.05
  (KGB on 1997-03-03)</option>
<option
  
  value="KGB/PGPLOT-2.04"
>2.04
  (KGB on 1997-02-24)</option>
<option
  
  value="KGB/PGPLOT-2.02"
>2.02
  (KGB on 1997-02-19)</option>
<option
  
  value="KGB/PGPLOT-2.01"
>2.01
  (KGB on 1997-01-03)</option>
<option
  
  value="KGB/PGPLOT-2.0"
>2.0
  (KGB on 1997-01-02)</option>
<option
  
  value="KGB/PGPLOT1.0b_src"
>1.0b_src
  (KGB on 1996-02-23)</option>
<option
  
  value="KGB/PGPLOT1.0a_src"
>1.0a_src
  (KGB on 1996-02-23)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/PGPLOT">PGPLOT-2.28</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage one &#10;
          • 3 direct dependents &#10;          • 3 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="10"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="PGPLOT-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="PGPLOT-2.28">
    <input type="hidden" name="author" value="ETJ">
    <input type="hidden" name="distribution" value="PGPLOT">
    <button type="submit" class="favorite highlight"><span>1</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="PGPLOT.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>1</span> ++</a>
</div>
   / <span>PGPLOT</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="PGPLOT.html#NAME">NAME</a></li>
  <li><a href="PGPLOT.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="PGPLOT.html#DESCRIPTION">DESCRIPTION</a>
    <ul>
      <li><a href="PGPLOT.html#Argument-Mapping-Simple-Numbers-And-Arrays">Argument Mapping - Simple Numbers And Arrays</a></li>
      <li><a href="PGPLOT.html#Argument-Mapping-Images-And-2d-Arrays">Argument Mapping - Images And 2d Arrays</a></li>
      <li><a href="PGPLOT.html#Argument-Mapping-Function-Names">Argument Mapping - Function Names</a></li>
      <li><a href="PGPLOT.html#Argument-Mapping-General-Handling-Of-Binary-Data">Argument Mapping - General Handling Of Binary Data</a></li>
    </ul>
  </li>
  <li><a href="PGPLOT.html#HISTORY">HISTORY</a></li>
  <li><a href="PGPLOT.html#OBTAINING-PGPLOT">OBTAINING PGPLOT</a></li>
  <li><a href="PGPLOT.html#AUTHORS">AUTHORS</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>PGPLOT - allow subroutines in the PGPLOT graphics library to be called from Perl.</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code> use PGPLOT;

 pgbegin(0,&quot;/xserve&quot;,1,1);  
 pgenv(1,10,1,10,0,0);        
 pglabel(&#39;X&#39;,&#39;Y&#39;,&#39;My plot&#39;);  
 pgpoint(7,[2..8],[2..8],17);

 # etc...

 pgend;           </code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>This module provides an inteface to the PGPLOT graphics library. To obtain the library and its manual, see <a href="PGPLOT.html#OBTAINING-PGPLOT">&quot;OBTAINING PGPLOT&quot;</a>.</p>

<p>For every PGPLOT function the module provides an equivalent Perl function with the same arguments. Thus the user of the module should refer to the PGPLOT manual to learn all about how to use PGPLOT and for the complete list of available functions. Note that PGPLOT is at its heart a Fortran library, so the documentation describes the Fortran interface.</p>

<p>Also refer to the extensive set of test scripts (<code>test*.p</code>) included in the module distribution for examples of usage of all kinds of PGPLOT routines.</p>

<p>How the function calls map on to Perl calls is detailed below.</p>

<h2 id="Argument-Mapping-Simple-Numbers-And-Arrays"><a id="Argument"></a>Argument Mapping - Simple Numbers And Arrays</h2>

<p>This is more or less as you might expect - use Perl scalars and Perl arrays in place of FORTRAN/C variables and arrays.</p>

<p>Any FORTRAN REAL/INTEGER/CHARACTER* scalar variable maps to a Perl scalar (Perl doesn&#39;t care about the differences between strings and numbers and ints and floats).</p>

<p>Thus you can say:</p>

<p>To draw a line to point (42,$x):</p>

<pre><code> pgdraw(42,$x); </code></pre>

<p>To plot 10 points with data in Perl arrays <code>@x</code> and <code>@y</code> with plot symbol no. 17. Note the Perl arrays are passed by reference:</p>

<pre><code> pgpoint(10, \@x, \@y, 17);</code></pre>

<p>You can also use the old Perl4 style:</p>

<pre><code> pgpoint(10, *x, *y, 17);</code></pre>

<p>but this is deprecated in Perl5.</p>

<p>Label the axes:</p>

<pre><code> pglabel(&quot;X axis&quot;, &quot;Data units&quot;, $label);</code></pre>

<p>Draw ONE point, see how when <code>N=1</code> <code>pgpoint()</code> can take a scalar as well as a array argument:</p>

<pre><code>  pgpoint(1, $x, $y, 17);</code></pre>

<h2 id="Argument-Mapping-Images-And-2d-Arrays"><a id="Argument1"></a>Argument Mapping - Images And 2d Arrays</h2>

<p>Many of the PGPLOT commands (e.g. <code>pggray</code>) take 2D arrays as arguments. Several schemes are provided to allow efficient use from Perl:</p>

<ol>

<li><p>Simply pass a reference to a 2D array, e.g:</p>

<pre><code>  # Create 2D array

  $x=[];
  for($i=0; $i&lt;128; $i++) { 
     for($j=0; $j&lt;128; $j++) {
       $$x[$i][$j] = sqrt($i*$j); 
     }
  }
  pggray( $x, 128, 128, ...);</code></pre>

</li>
<li><p>Pass a reference to a 1D array:</p>

<pre><code>  @x=();
  for($i=0; $i&lt;128; $i++) { 
     for($j=0; $j&lt;128; $j++) {
       $x[$i][$j] = sqrt($i*$j); 
     }
  }
  pggray( \@x, 128, 128, ...);</code></pre>

<p>Here @x is a 1D array of 1D arrays. (Confused? - see perldata(1)). Alternatively @x could be a flat 1D array with 128x128 elements, 2D routines such as <code>pggray()</code> etc. are programmed to do the right thing as long as the number of elements match.</p>

</li>
<li><p>If your image data is packed in raw binary form into a character string you can simply pass the raw string. e.g.:</p>

<pre><code>   read(IMG, $img, 32768); 
   pggray($img, $xsize, $ysize, ...);</code></pre>

<p>Here the <code>read()</code> function reads the binary data from a file and the <code>pggray()</code> function displays it as a grey-scale image.</p>

<p>This saves unpacking the image data in to a potentially very large 2D perl array. However the types must match. The string must be packed as a <code>&quot;f*&quot;</code> for example to use <code>pggray</code>. This is intended as a short-cut for sophisticated users. Even more sophisticated users will want to download the <code>PDL</code> module which provides a wealth of functions for manipulating binary data.</p>

<p><i>Please Note</i>: As PGPLOT is a Fortran library it expects its images to be be stored in row order. Thus a 1D list is interpreted as a sequence of rows end to end. Perl is similar to C in that 2D arrays are arrays of pointers thus images end up stored in column order.</p>

<p>Thus using perl multidimensional arrays the coordinate ($i,$j) should be stored in $img[$j][$i] for things to work as expected, e.g:</p>

<pre><code>   $img = [];
   for $j (0..$nx-1) for $i (0..$ny-1) { 
      $$img[$j][$i] = whatever();
   }}
   pggray($$img, $nx, $ny, ...);
   </code></pre>

<p>Also PGPLOT displays coordinate (0,0) at the bottom left (this is natural as the subroutine library was written by an astronomer!).</p>

</li>
</ol>

<h2 id="Argument-Mapping-Function-Names"><a id="Argument2"></a>Argument Mapping - Function Names</h2>

<p>Some PGPLOT functions (e.g. <code>pgfunx</code>) take functions as callback arguments. In Perl simply pass a subroutine reference or a name, e.g.:</p>

<pre><code> # Anonymous code reference:

 pgfunx(sub{ sqrt($_[0]) },  500, 0, 10, 0);

 # Pass by ref:

 sub foo {
   my $x=shift;
   return sin(4*$x);
 }

 pgfuny(\&amp;foo, 360, 0, 2*$pi, 0);

 # Pass by name:

 pgfuny(&quot;foo&quot;, 360, 0, 2*$pi, 0);</code></pre>

<h2 id="Argument-Mapping-General-Handling-Of-Binary-Data"><a id="Argument3"></a>Argument Mapping - General Handling Of Binary Data</h2>

<p>In addition to the implicit rules mentioned above PGPLOT now provides a scheme for explicitly handling binary data in all routines.</p>

<p>If your scalar variable (e.g. <code>$x</code>) holds binary data (i.e. &#39;packed&#39;) then simply pass PGPLOT a reference to it (e.g. <code>\$x</code>). Thus one can say:</p>

<pre><code>   read(MYDATA, $wavelens, $n*4);
   read(MYDATA, $spectrum, $n*4);
   pgline($n, \$wavelens, \$spectrum);</code></pre>

<p>This is very efficient as we can be sure the data never gets copied and will always be interpreted as binary.</p>

<p>Again see the <a href="PDL.html">PDL</a> module for sophisticated manipulation of binary data, since it takes great advantage of these facilities. See in particular <a href="https://metacpan.org/pod/PDL::Graphics::PGPLOT">PDL::Graphics::PGPLOT</a>.</p>

<p>Be VERY careful binary data is of the right size or your segments might get violated.</p>

<h1 id="HISTORY">HISTORY</h1>

<p>Originally developed in the olden days of Perl4 (when it was known as &#39;pgperl&#39; due to the necessity of making a special perl executable) PGPLOT is now a dynamically loadable perl module which interfaces to the FORTRAN graphics library of the same name.</p>

<h1 id="OBTAINING-PGPLOT"><a id="OBTAINING"></a>OBTAINING PGPLOT</h1>

<p>PGPLOT is a FORTRAN library with C bindings, While the Perl module uses the latter, a FORTRAN compiler is still required to build the library.</p>

<p>The official library and the manual are available from <a href="http://astro.caltech.edu/~tjp/pgplot/">http://astro.caltech.edu/~tjp/pgplot/</a></p>

<p>Building the library using the official distribution is arcane, tedious, and error-prone. Additionally, the official distribution lacks a number of bug fixes and additions provided by the community over the years.</p>

<p>A modern packaging (using the GNU autotools) of the more up-to-date code base is available from <a href="https://bitbucket.org/djerius/pgplot-autotool/downloads">https://bitbucket.org/djerius/pgplot-autotool/downloads</a></p>

<p>The packaging has been tested on Linux and Mac OS X.</p>

<p>Source code is available at either of these sites</p>

<dl>

<dt id="https://github.com/djerius/pgplot-autotool"><a id="https"></a><a id="https:-github.com-djerius-pgplot-autotool"></a><a href="https://github.com/djerius/pgplot-autotool">https://github.com/djerius/pgplot-autotool</a></dt>
<dd>

</dd>
<dt id="https://bitbucket.org/djerius/pgplot-autotool/src"><a id="https1"></a><a id="https:-bitbucket.org-djerius-pgplot-autotool-src"></a><a href="https://bitbucket.org/djerius/pgplot-autotool/src">https://bitbucket.org/djerius/pgplot-autotool/src</a></dt>
<dd>

</dd>
</dl>

<h1 id="AUTHORS">AUTHORS</h1>

<p>Karl Glazebrook &lt;kgb@aaoepp.aao.gov.au&gt;</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install PGPLOT, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm PGPLOT</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install PGPLOT</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="PGPLOT.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
